package demo.isolib {
	import flash.events.Event;

	/**
	 */
	public class TileEvent extends Event {

		static public const MOVE_START:String 		= "moveStart";
		static public const MOVE_UPDATE:String 		= "moveUpdate";
		static public const MOVE_COMPLETE:String 	= "moveComplete";		
		static public const MOVE_ABORT:String 		= "moveAbort";
		
		static public const CANT_MOVE:String 		= "cantMove";
		
		static public const DESELECTED:String	 	= "deselected";
		static public const SELECTED:String 		= "tileSelected";

		// mouse events
		static public const UP:String 				= "tileUp";
		static public const DOWN:String 			= "tileDown";
		static public const MOVE:String 			= "tileMove";
		static public const OVER:String 			= "tileOver";
		static public const OUT:String 				= "tileOut";
		static public const CLICK:String 			= "tileClick";
		
		
		public var data:*;

		public function TileEvent(type:String, data:* = null) {
			super(type);
			this.data = data;
		}

		public override function clone():Event {
			return new TileEvent(type, data);
		}

		public override function toString():String {
			return formatToString("TileEvent", "type", "data");
		}
		
	}

}